System and method for collaborative processing of distributed applications

ABSTRACT

A system and method for generating and executing machine-language filter code. A filter generator receives a text-based filter string. The filter string contains filter criteria for filtering messages communicated from one computer program to another computer program or to the same computer program. A machine language generator converts the filter string to a machine-language filter code. A central processing unit of a host loads and executes the machine-language filter code to process or discard messages based on the filter criteria. The machine-language filter code is maintained by the computer program for continual reuse eliminating the interpretation and translation of the filter string from data to code for each message.

CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

This application is a divisional of U.S. patent application Ser. No.11/485,229, filed Jul. 11, 2006, which is a continuation of U.S. patentapplication Ser. No. 09/766,382, filed Jan. 19, 2001, now issued as U.S.Pat. No. 7,080,120, the contents of all of which are incorporated hereinby reference.

BACKGROUND OF THE INVENTION

The present invention generally relates to computer systems, and moreparticularly to executing collaborative application software in acomputer network.

Computer networks have become an important platform for storing anddelivering application programs to users. In a model widely referred toas client/server, an application server is considered a central hub fromwhich a number of clients can request and receive application softwarefor performing a specific function. In the past, most applications wereexecuted locally at a client, with application software that was locallystored in the client platform. Today, however, in one configuration,applications are stored in a central server, and delivered to a clientin components for local processing. Another common configuration is forthe client to send processing requests to the server, which executes theapplication that is specified in the request on the server and sends theresults back to the client for local processing. In this configuration,the application is maintained in the server.

The tremendous growth of use of the Internet and World Wide Web (the“Web”) in the past few years has resulted in increasingly morecommunication between clients and servers. Most of the communications inthe short history of the Web relate to delivery of requested contentdata from a web server to a client. A web server is a specialized typeof server that communicates according to a particular protocol, thehypertext transport protocol, or HTTP. Other hypermedia protocols arealso used or are being developed.

Traditionally, Internet-based application processing in a client/servermodel occurs mostly through a web server. Network-based applications forthe client/server model, such as those through the Web, are becomingincreasingly complex and interactive. Problems with current softwareinfrastructure for administering network-based applications includedifficulty in the creation and delivery of application components,complexities of managing the interface between a client and a server,and processing delays and inefficiencies. The current and nextgenerations of the Web, in its Internet, intranet and extranetembodiments, demand a platform-neutral architecture that can effectivelyhandle complex Web-based distributed client/server applications forcollaborative processing.

A host is a physical machine having operating system software thatmanages one or more other computer programs that reside on the physicalmachine. A computer program includes one or more software componentsthat work together to perform the logic of the program. Each computerprogram can communicate information with other computer programs on thesame host or on a different host. A unit of information to becommunicated is referred to as a payload. Before transmission, thepayload is supplemented with one or more properties. Properties includedata for identifying information within and about the payload. A messagerepresents a combination of the properties and the payload.

A computer program includes a code section and a data section. The codesection contains machine-language code, which is a sequence of bytevalues that are arranged in such a way to be executed directly by thecentral processing unit (CPU) of the host, to perform a specific task.The data section is a sequence of byte values, that is used to storedata structures required by the computer program. The data section bytevalues may or may not be arranged in machine-language code.

An important mechanism for efficient communication of messages from onecomputer program to another is a filter, by which messages of interestare communicated and all other messages are discarded. A filter stringis a text-based expression of logic that is readable by a human user,and which is executed by a computer program for performing a filteringtask. One example of a filter string is a Boolean logic expression thatincludes Boolean operators such as “and” or “or” and references to themessage properties and or the payload. Computer programs can include oneor more filters to execute the Boolean logic expression on each receivedmessage to determine if the message should be processed or disregardedby the computer program.

Typically, when a computer program performs filtering, a filtergenerator is used. The filter generator accepts a filter string andreorganizes the filter string into a data structure. The data structurerepresents the filter string, and is stored in the data section of thecomputer program employing the filter. Typically, the filter string isrepresented as a tree structure. Each time a new message is received bythe computer program, the data structure representing the filter stringis retrieved from the data section and is interpreted to executemachine-language code specific to the host machine in which the computerprogram resides. Since the machine-language code is specific to aparticular type of host, it is an effective means of filtering messages.

However, the interpretation of the data structure created from thefilter string to execute the machine-language code is required for everymessage and adds significant processing delay, especially when a largevolume of messages are being received by an computer program.

SUMMARY OF THE INVENTION

The aforementioned problems are overcome with a message filtering systemand method that converts the filter string directly intomachine-language code once for reuse on multiple messages, therebyeliminating the intermediate step of interpreting the filter stringrepresentation to execute the appropriate machine-language code on eachmessage. In accordance with one embodiment of the invention, a method offiltering information transmitted from one computer program to anothercomputer program or to the same computer program includes receiving atextbased filter string representing filter criteria, and converting thefilter string directly into machine-language code. The embodimentfurther includes loading the machine-language code into a computerprogram to accept or discard information based on the filter criteria.

In accordance with an alternative embodiment of the invention, a systemof filtering information transmitted from one computer program toanother computer program or to the same computer program includes afilter generator configured to receive a text-based filter stringrepresenting filter criteria, and a machine-language code generatorcoupled with the filter generator and being configured to convert thefilter string to machine-language code. The system further includes amechanism by which the machine-language code is loaded into a computerprogram. Once loaded into the computer program, the machine-languagecode is termed machine-language filter code and is continually executedto accept or discard information based on the filter criteria.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a system for collaborative processing with distributedapplications, according to one embodiment of the invention.

FIG. 2 shows communication between a host and a remote host via themessaging bus.

FIG. 3 shows a message filtering system according to one embodiment ofthe invention.

FIG. 4 shows a method for filtering messages according to an embodimentof the invention.

DETAILED DESCRIPTION

This invention relates to executing and processing applications. Anapplication is software that performs specific logic. As used herein,the term application refers to an entire application, or an applicationcomponent that defines a portion of an application. A number ofapplication components can work together to execute the logic of theapplication. In one embodiment, this invention provides a method forcommunication between client-side application components and server-sideapplication components. Further, the invention provides for theexecution and administration of applications residing within a CGIengine hosted on a server platform. The invention provides a structurefor performing collaborative processing with distributed applications.

In a preferred embodiment of the invention, a system and method forcollaborative processing of distributed applications is embodied as oneor more computer programs configured to work together. Every computerprogram includes at least one code section and at least one datasection. The code section is a sequence of bytes that can be executeddirectly by the central processing unit (CPU) of a host. The datasection includes sequences of bytes that may be executed by the CPU ofthe host, but which are mostly used to store data structures for use bythe code section.

FIG. 1 shows a system 100 for collaborative processing of distributedapplications, according to one embodiment of the invention. The system100 includes a host 102. In one embodiment, the host 102 is a physicalmachine having an operating system that manages one or more computerprograms. A computer program can include one or more operations runningwithin it that share the same data section of the computer program. Thehost 102 can also include a CPU that executes the code section of thecomputer programs. The computer programs can be resident on the host 102in permanent or temporary storage, or can be communicated to the host102 by external computer programs.

The host 102 includes a computer program 130, which includes a CGIengine 104, which in an embodiment is an operation configured to executeand administer one or more CGIs, and a messaging bus 120, which in anembodiment is another operation configured to enable multiple operationswithin the computer program to communicate with each other. In aspecific exemplary embodiment, the CGIs administered by the CGI engine104 are servlets. A servlet is a particular type of CGI that can beconfigured to execute a certain function, such as manage an application,for example. While a servlet is typically written in the Javaprogramming language, a CGI can be written according to otherprogramming languages or logic structures. According to the invention,the CGI engine 104 is configured to function as an application server,including, without being limited to, logging information related to theuse and operation of applications, authentication of users of CGIs, andauthorization of the usage of the CGIs.

The host can also include a web server 106. The web server 106 functionsas a conventional web server that communicates with a client accordingto the hypertext transfer protocol (HTTP). As used herein, HTTP meansany application-level protocol that is supported by a web server or aweb browser, including but not limited to secure HTTP (HTTPS). In anembodiment of the invention, the web server 106 also communicates withthe CGI engine 104, from which the web server 106 executes one or moreCGIs running in the CGI engine 104. In a specific embodiment, the webserver 106 invokes and executes one or more servlets, through whichcommunications are performed between the web server 106 and anapplication 114. One particular type of CGI according to the inventionis an application CGI 112. The application CGI 112 is configured toexecute and manage an associated application 114, in response torequests received from the web server 106. The application CGI 112 canbe a servlet. One specific type of servlet for the application CGI iscalled a sublet. A sublet is a servlet extension that is specificallyconfigured for executing and managing an associated application.

The CGI engine 104 can be configured with at least two contexts forrunning CGIs. One context is an application context 108. The applicationcontext 108 is a self-sustained environment of resources within the CGIengine 104 that is configured to, but not limited to, enable multipleCGIs and other programs to commonly share resources. The applicationcontext 108 also provides a secure environment in which an applicationCGI 112 and an application 114, and its supporting resources, canoperate shielded from corruption by other CGIs or applications runningin the CGI engine 104. For each application 114, the CGI engine 104 isconfigured to create an application context 108 that includes anapplication CGI 112 and one or more administration CGIs 116 associatedwith the application CGI 112. The application context 108 enables CGIs,such as administration CGIs 116, and application CGIs 112 with featuresthat include, but are not limited to, getting the actual location of aphysical resource within the host 102 from a representation of thatresource, and logging messages and exceptions being generated by theapplication. The application context 108 is further configured to enablethe application 114 to get a reference, i.e. find where in a memory, toother applications within the CGI engine 104 that are registered tocommunicate with the application 114. The reference can be based on aname of the application 114.

A second context is a gateway context 110, an environment havingresources for performing two-way asynchronous communication betweenapplications on the same host and different hosts. One form of suchcommunication is notification, in which two programs, or two operationswithin a program or within multiple programs, communicate data with eachother without being polled for the data by the other.

Applications 114 within the CGI engine 104 communicate with each otherasynchronously via a messaging bus 120. In a specific embodiment, themessaging bus 120 has multiple inputs and outputs and is configured tocommunicate data between associated inputs and outputs. A unit ofinformation that enters and leaves the messaging bus 120 is a message.There are multiple pairs of entry and exit points on the messaging bus120. Each pair represents a topic. Publishing is the act of sending amessage to a topic on the messaging bus 120. Subscribing is the act ofregistering to a topic, and receiving the messages published on thattopic. An application 114 can be both a publisher and subscriber to oneor more topics. When a message is published to a particular topic, themessage is communicated to all subscribers registered to that topicsimultaneously. In this way, collaborative communication and processingbetween publishers and subscribers to a topic, through a particularapplication, is enabled.

For efficient communication between applications, an application 114 orclient-side application 105 can employ a filter on the messaging bus toscan the content of messages on a certain topic, and determine whetherthe application employing the filter will either process the message ordisregard it. Such a filtering mechanism is described in U.S. patentapplication Ser. No. 09/766,383 entitled “System and Method forGenerating Machine-Language Code from Readable Text Code for InformationFiltering,” incorporated by reference herein for all purposes andreproduced in part below in reference to FIGS. 3 and 4.

The messaging bus 120 can logically extend across multiple hosts,enabling external applications to communicate with applications 114 thatreside within the local CGI engine 108. Extension of the messaging bus120 can occur whether or not a firewall 109 or proxy server resides inthe communication path between the local CGI engine 104 and the externalapplications. One example of an external application is a client-sideapplication 105 that resides in a client host 101 and runs within aclient application server 103.

In one embodiment, the messaging bus 120 is extended through the use ofa multicast protocol and configured to communicate with one or moreother messaging busses, and wherein each other messaging bus is residenton a remote host 135. FIG. 2 illustrates a multicast communication path140 between the host 102 and any remote host 135. Each host must supportthis protocol.

When the communication path does not support the multicast protocol, anexternal application can communicate asynchronously with the messagingbus 120 through a direct socket connection to the messaging busextension 122. In one embodiment, the messaging bus extension 122 iscreated using the socket select method. The socket select( )methodenables the efficient handling of large numbers of simultaneous socketconnections to the messaging bus 120. The socket select( ) method, whichcan be executed by the operating system of the host 102, waits untilinformation is available on any of the open socket connections to thehost 102. Upon the arrival of the information, the socket select()method returns a data structure that indicates which socket connectionshave information available to be processed. The messaging bus extension122 uses the information within the returned data structure to read theavailable information from each specified socket connection. Theinformation read from each socket is converted to a message andpublished onto the messaging bus 102 on a specific topic.

The messaging bus extension 122 multiplexes the input and outputoperations of the socket to publish and subscribe messages. Themultiplexing can be directed by the operating system of the host 102.

When the host 101 is located behind a firewall 109 or proxy server, theextension of the messaging bus is implemented as described in U.S.patent application Ser. No. 09/766,439 entitled “System and Method forMaintaining Two-Way Asynchronous Notification Between a Client and a WebServer,” incorporated by reference herein for all purposes. A gatewayCGI 118 implements the two-way asynchronous communication through afirewall 109 or proxy server. In one embodiment, the gateway CGI 118 canbe one or more servlets, administered and executed within the gatewaycontext 110. When an external application that is not behind a firewall109 or proxy server communicates messages to the messaging bus 120, amessaging bus extension 122 is used.

External applications can reside on another host, or on the same host102 in another CGI engine. External applications can also reside on aclient host 101, where they are executed as a client-side application105. A client host 101 can include a client application server 103 inwhich the client-side application 105 is pre-installed, or to which theclient-side application 105 is dynamically delivered from the web server106 in the host 102.

The CGI engine 104, in communication with the web server 106, providesone form of access to the application 114. The web server 106 isconfigured to direct certain client requests from a client 101 to therelevant application CGI 112 in the CGI engine 104.

In an exemplary embodiment of the invention, the application CGI 112 isconfigured as a sublet and interacts with the application 114 accordingto an interface definition. In a specific embodiment, the interfacedefinition is an extension of a servlet interface definition. Thisinterface definition includes, without limitation, the followingoperations:

-   a) an initialization operation that accepts as an argument the    application CGI configuration,-   b) a service operation to return information about the associated    application 114,-   c) a destroy operation to be invoked by the termination of the    execution of the CGI engine 104 that enables the release of reserved    resources and terminates the application CGI 112 and its associated    application 114,-   d) operations to load and save the current state of the associated    application 114,-   e) operations to set and get the internal attributes of the    associated application 114,-   f) an operation to invoke an operation within the associated    application 114.

The initialization operation of each application CGI 112 receives theapplication CGI configuration and applies it to the associatedapplication 114 to prepare it for use. The application CGI configurationincludes, without limitation, the following information:

a) a list of initialization parameter names,b) an initialization parameter value for a given a parameter name,c) a reference to the application context 108.

The service operation of the application CGI 112 gathers and returnsinformation about the associated application 114. This informationincludes without limitation:

-   a) a list of information about the attributes of the application 114    that includes the attribute name, description, type, and read/write    accessibility,-   b) a list of information about the operations within the application    114 that includes each operation's name, description, type of    information returned and information about the operation's    parameters. Information about an operation parameter includes the    parameter name, description and type.

The application CGI 112 can handle HTTP requests through its serviceoperation. The implementation of the service operation in theapplication CGI 112 is used to administer the associated application114. The administration includes, but is not limited to, the retrievalof information about the application 114, the retrieval and modificationof its attribute values, the invocation of an operation within theapplication 114 and the saving of the current state of the application114. The information and status returned from the administrative tasksis forwarded to the administration servlet 116 to format thisinformation for presentation purposes.

Operation of the system 100 is as follows. In one embodiment, the CGIengine 104 administers the application 114 through the use of the webserver 106. For instance, a client host 101 initiates the execution theapplication 114 by submitting an HTTP request to the web server 106 fromthe client-side application 105. The client-side application 105 can be,for example, an application running inside of a web browser program. Theweb server 106 redirects the request to the CGI engine 104. The CGIengine 104 invokes the application CGI 112 associated with theapplication 114 to process the request, which returns a responsecontaining the result of the request to the web server 106 who forwardsit on to the client host 101, for use by the client-side application105.

When the CGI engine 104 starts, it loads the configuration filesassociated with each CGI. The content of a configuration file is calledthe CGI configuration. For each CGI in the CGI engine 104, the CGIengine 104 scans the CGI configuration to determine which of the CGIsneeds to be instantiated at startup time. The CGI engine 104 invokes astandard initialization operation on each CGI that is instantiated withthe CGI configuration as an argument. Upon the successful completion ofthe initialization operation, the CGI is registered to run within theCGI engine 104.

For the application CGI 112, the standard initialization operationcomposes a sublet configuration from the content of the scannedconfiguration file, and invokes the initialization operation of theassociated application 114 with the application CGI configuration as anargument. If the initialization operation is successful, then the loadoperation of the application CFI 112 is invoked. The load operation isused to load the previously saved state of the application 114. When theCGI engine 104 is instructed to terminate the application CGI 112, thedestroy operation in each registered CGI is invoked. This inherentlyinvokes a sublet destroy operation to terminate the application 114.

Administrative actions that can be requested by the client host 101 fromthe client-side application 105 and executed by the CGI engine 104include, without limitation, initiating and terminating the application114, and modifying its logic flow.

When the messaging bus 120 is extended to a client-side application 105running within the environment of the client application server 103, theclient-side application 105 can publish, subscribe and process messagesfrom the messaging bus 120. The client-side application 105 receives amessage, processes the message, and composes a data structure that canbe understood by the client application server 103. The client-sideapplication 105 then delivers the data structure to the clientapplication server 103 and instructs it to process the content of thedelivered data structure.

In a specific exemplary embodiment of the invention, the administrationCGI 116 is implemented using the Java Server Page (JSP) specification.The information forwarded to the administration CGI 116 is packaged asan attribute value within the HTTP request. The administration CGI 116retrieves the attribute value and reformats it into a document that isreadable by the requesting client application 103. In a preferredembodiment, the document format is in HTML. As used herein, HTML meansany document format that is supported by a web browser, including butnot limited to Dynamic HTML (DHTML).

In the specific exemplary embodiment, the client application server 103is a web browser, the client-side application 105 is an HTMLdocument-with a Java Applet. The web server 106 that is running inconjunction with the CGI engine 104 delivers the HTML document with theJava applet to the web browser 103. Upon the completion of the delivery,the Java Applet is initiated and establishes a connection to themessaging bus 120 as described above. The Java Applet now contains anextension of the messaging bus 120 and is a publisher and/or subscriberto one or more topics on the messaging bus 120.

The Java Applet is configured to call specific functions in the HTMLdocument upon the receipt of a message on a particular topic or topics.The functions within the HTML document or template accept as argumentsthe property values of the message and convert these values into a HTMLformatted text string that is executed by a component within the HTMLdocument or template.

In another embodiment, the client-side application 105 is a Java Appletand the HTML document or template can be delivered as a property valuewithin a message. The Java Applet reads the HTML document or templatewithin the message and instructs the web browser 103 to render the HTMLdocument or template.

In still another embodiment, the client-side application 105 is a JavaApplet that dynamically generates the HTML document or template and theresult is forwarded to a component in the web browser 103 for rendering.

FIG. 3 shows a system 300 for generating machine-language code formessage filtering. System 300 preferably includes a host 302. The host302 represents a physical machine having a central processing unit (CPU)320 and an operating system software that manages one or more computerprograms that reside on the physical machine and which are executed bythe CPU 320.

A computer program 303 includes one or more software components 304. Inaccordance with an embodiment of the invention, one such softwarecomponent is a filter generator 310. The filter generator 310 acceptsfilter strings from a software component 304. The filter string definesan acceptance criteria by which the software component 304 processes ordiscards messages.

In one embodiment, filter strings are expressed in a text-based formatthat is readable by a human user, and whose syntax is based on theStructured Query Language (SQL) conditional expression syntax. The textcan include, without limitation, one or more expressions separated by aBoolean operator such as “and” or “or” for example. Each expression ismade up of two elements separated by a Boolean conditional operator such“less-than” or “greater-than.” One element of the expression can be anumerical or functional value, or can be a reference to an element inthe message.

The filter generator 310 includes a machine-language code generator 312.The filter generator 310 reorganizes each submitted filter string into aformat that is acceptable to the machine-language code generator 312.The machine-language code generator 312 accepts the newly formattedfilter string as an input, and generates machine language filter code317. The machine language filter code 317 is then loaded into thecomputer program 303 to produces a filter software component 322 inmachine-language code, which can be directly executed by the CPU 320 ofthe host 302.

According to an exemplary embodiment, the machine-language codegenerator 312 represents a Java™ compiler, the computer program 303represents a Java virtual machine (JVM), and the software component 304is a Java class. The filter generator 310 accepts a filter string as aninput, from which it generates a Java™ text file that defines a Java™class, which implements a predefined filter interface definition.

The filter interface definition calls for the implementation of afunction that returns a Boolean value and expects as an argument animplementation of a predefined message interface definition. The messageinterface definition is empty to enable the generalization of the filterto any specific message implementation. The returned Boolean valueindicates to the software component 304 if the received message shouldbe processed or disregarded.

The Java™ text file is compiled by the Java™ compiler 312 to produce aJava™ class 317. The Java™ class 317 is loaded into the computer program303 to produce the filter software component 322 for message filtering.Accordingly, each time a message 330 is received by the computer program303, the filter software component 322 evaluates the received message330 by applying the filter criteria to the message and instructs thesoftware component 304 to either process the message 335, or reject themessage 330.

FIG. 4 is a flowchart illustrating a method 400 according to anembodiment of the invention. The method 400 can be executed at otherfunctional levels of a computer system. At block 405, a filter string isreceived. The filter string may be received from a separate computerprogram residing on another host, or the same host, or from within asingle computer program. The filter string is in a text-based formatthat is readable by a human user and whose syntax is based on the SQLconditional expression syntax.

At block 410, a determination is made whether the filter string requiresconversion into machine-language filter code. The conversion intomachine-language filter code is required if there is no recollection ofa recently-performed translation of a similar filter string. Ifconversion is required, at block 415, the text-based filter string isprepared for the machine-language code generator. At block 420, theprepared filter string is converted into machine-language code by themachine-language code generator. If the conversion is not required, atblock 425, a determination is made whether the machine-language filtercode is already loaded into the computer program.

If the machine-language filter code is not loaded, then at block 430 themachine-language code is loaded into the computer program. At block 435,the computer program with the filter software component is executed onmultiple incoming messages. Accordingly, the multiple incoming messagesare evaluated against the filter criteria represented in the filtersoftware component, to process or discard messages in the specifiedmanner.

Other embodiments, combinations and modifications of this invention willoccur readily to those of ordinary skill in the art in view of theseteachings. Therefore, this invention is to be limited only by thefollowing claims, which include all such embodiments and modificationswhen viewed in conjunction with the above specification and accompanyingdrawings.

1. A method of filtering messages, comprising: receiving a text-basedfilter string representing filter criteria; automatically dynamicallyconverting the text-based filter string directly to machine-languagefilter code once using a machine language generator for use by a codesection of a computer program, the machine language generator beingconfigured to dynamically convert the text based filter string directlyto machine language filter code; and using the code section, executingthe machine-language filter code to accept or discard multiple messagesreceived by or residing within one or more software components withinthe computer program based on the filter criteria.
 2. The method ofclaim 1, wherein executing the machine-language filter code is performedby a central processing unit running the computer program.
 3. The methodof claim 1, wherein the machine-language filter code is directlyexecutable by the central processing unit.
 4. The method of claim 1,wherein the text-based filter string is human-readable.
 5. The method ofclaim 1, wherein the text-based filter string is formatted according toa conditional expression syntax.
 11. A system of filtering informationtransmitted from one or more software components within a computerprogram to one or more other software components within another computerprogram or the same computer program, comprising: a filter generatorconfigured to receive a text-based filter string representing filtercriteria; a machine language generator coupled with the filter generatorand being configured to automatically dynamically convert the text-basedfilter string directly to machine-language filter code; and a processorfor executing the machine-language filter code for a software componentof a computer program to accept or discard information received by thesoftware component within the computer program based on the filtercriteria.
 12. The system of claim 11, wherein the processor is includedwith a central processing unit.
 13. The system of claim 11, wherein themachine-language filter code is directly executable by the centralprocessing unit.
 14. The system of claim 11, wherein the filter stringis human readable.
 15. The system of claim 11, wherein the filter stringis formatted according to a conditional expression syntax.